home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / lib / partman / active_partition / 67toggle_biosgrub / choices next >
Encoding:
Text File  |  2009-04-19  |  761 b   |  40 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. dev=$1
  6. id=$2
  7.  
  8. cd $dev
  9.  
  10. valid_biosgrub=no
  11. open_dialog VALID_FLAGS $id
  12. while { read_line flag; [ "$flag" ]; }; do
  13.     if [ "$flag" = bios_grub ]; then
  14.         valid_biosgrub=yes
  15.     fi
  16. done
  17. close_dialog
  18.  
  19. [ $valid_biosgrub = yes ] || exit 0
  20.  
  21. biosgrub=no
  22. open_dialog GET_FLAGS $id
  23. while { read_line flag; [ "$flag" ]; }; do
  24.     if [ "$flag" = bios_grub ]; then
  25.         biosgrub=yes
  26.     fi
  27. done
  28. close_dialog
  29.  
  30. db_metaget partman-partitioning/text/biosgrub description
  31. description=$(stralign -25 "$RET")
  32.  
  33. if [ $biosgrub = yes ]; then
  34.     db_metaget partman-partitioning/text/on description
  35.     printf "nobiosgrub\t%s%s\n" "$description" "${RET}"
  36. else
  37.     db_metaget partman-partitioning/text/off description
  38.     printf "biosgrub\t%s%s\n" "$description" "${RET}"
  39. fi
  40.